package com.dp.mallchat.common.user.service;

import com.dp.mallchat.common.common.domain.vo.req.CursorPageBaseReq;
import com.dp.mallchat.common.common.domain.vo.resp.CursorPageBaseResp;
import com.dp.mallchat.common.user.domain.entity.UserFriend;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dp.mallchat.common.user.domain.user.resp.UserFriendResp;

import java.util.List;

/**
 * <p>
 * 用户联系人表 服务类
 * </p>
 *
 * @author <a href="https://gitee.com/baiDP">adu</a>
 * @since 2024-06-19
 */
public interface UserFriendService extends IService<UserFriend> {

    CursorPageBaseResp<UserFriendResp> friendList(Long uid, CursorPageBaseReq cursorPageBaseReq);

    /**
     * 判断是否是好友
     * @param uid    uid
     * @param targetUid 好友id
     * @return
     */
    UserFriend isUserFriend(Long uid, Long targetUid);

    /**
     * 批量判断是否是好友
     * @param uid    uid
     * @param targetUids 好友ids
     * @return
     */
    List<UserFriend> isUserFriend(Long uid, List<Long> targetUids);

    /**
     * 创建好友关系
     * @param uid
     * @param targetId
     */
    void createFriend(Long uid, Long targetId);

    /**
     * 删除好友
     * @param uid uid
     * @param friendUid  好友
     */
    void deleteFriend(Long uid, Long friendUid);
}
